from config.database import Base
from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, String, DECIMAL


# 往来款提示

class Wlkts(Base):
    """
    往来款提示信息表
    """

    __tablename__ = 'business_wlkts'

    id = Column(Integer, primary_key=True, autoincrement=True, comment='主键')
    title = Column(String(255), nullable=False, comment='名称')
    type = Column(String(1), nullable=False, comment='类型')
    amount = Column(DECIMAL(10,2), nullable=False, comment='金额')
    party_b = Column(String(255), nullable=False, comment='对方')
    project_name = Column(String(255), nullable=False, comment='项目名称')
    project_cycle = Column(String(255), nullable=False, comment='项目周期')
    duty_dept = Column(Integer, nullable=False, comment='责任科室')
    duty_dept_name = Column(String(255), nullable=False, comment='责任科室名称')
    operator = Column(String(255), nullable=False, comment='经办人')
    phone = Column(String(255), nullable=False, comment='联系电话')
    end_time = Column(DateTime,  comment='到期时间')
    complete_time = Column(DateTime,  comment='完成时间')
    remark = Column(String(255),  comment='备注')
    create_by = Column(String(64), default='', comment='创建者')
    create_time = Column(DateTime, default=datetime.now(), comment='创建时间')
    update_by = Column(String(64), default='', comment='更新者')
    update_time = Column(DateTime, default=datetime.now(), comment='更新时间')
    del_flag = Column(String(1), default='0', comment='删除标志（0代表存在 2代表删除）')

    